//
//  MLAHudManage.m
//  MagicLampApp
//
//  Created by Zheng on 2018/12/24.
//  Copyright © 2018 zheng.magic.lamp.app. All rights reserved.
//

#import "MLAHudManage.h"

@implementation MLAHudManage

+ (void)showLoading {
    [SVProgressHUD dismiss];
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD setImageViewSize:CGSizeMake(28, 28)];
        [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear];
        [SVProgressHUD show];
    });
}

+ (void)hideLoading
{
    [SVProgressHUD dismiss];
}

+ (void)showMessage:(NSString *)message
{
    [SVProgressHUD dismiss];
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear];
        [SVProgressHUD setImageViewSize:CGSizeMake(0, -1)];
        [SVProgressHUD setMinimumSize:CGSizeMake(100, 40)];
        [SVProgressHUD setCornerRadius:10];
        [SVProgressHUD setBackgroundColor:CX_GetColorHex(0x000000, 0.5)];
        [SVProgressHUD setForegroundColor:[UIColor whiteColor]];
        [SVProgressHUD setFont:CX_GetNormalFont(14)];
        [SVProgressHUD showImage:[UIImage new] status:message];
        [SVProgressHUD dismissWithDelay:2];
    });
}







@end
